<%-- 
    Document   : statistics
    Created on : 13-mar-2012, 16:47:57
    Author     : Alvaro
--%>
<%@page import="classes.user"%>
<%@page import="java.util.ArrayList"%>
<%@page import="classes.product"%>
<%@page import="classes.order"%>
<%@page import="classes.AdminDB"%>
<%@page import="classes.graph"%>
<%ArrayList<product> productos = (ArrayList<product>) session.getAttribute("listaDeproductos");%>
<%ArrayList<order> orders = (ArrayList<order>) session.getAttribute("statsDay");%>
<%ArrayList<user> users = (ArrayList<user>) session.getAttribute("TopUsuarios");%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Stats | Admin</title>
        <link rel="stylesheet" type="text/css" href="../css/admin.css" />

    </head>
    <body>
    
        <h1 align="center" class="titulo">Stats</h1>
        <!-- Datepicker -->
	
    <p align="center">&nbsp;</p>
     <div align="center">
       <%if (productos == null) {%>
     </div>
     <form name="form1" method="post" action="/ShopOnline/listProducts">
       <div align="center">
         <input type="submit" name="cargasProd" id="cargasProd" value="Load Products">
         <input type="hidden" name="stats" value="stats">
       </div>
     </form>	
        <div align="center">
          <%} %>
          <%if (orders == null) {%>
        </div>
        <form name="form1" method="post" action="/ShopOnline/listOrders">
          <div align="center">
            <input type="submit" name="cargasProd" id="cargasProd" value="Load sales">
            <input type="hidden" name="orderinfo" value="stats">
          </div>
        </form>	
        <div align="center">
          <%}%>
          <% if (users == null) {%>
        </div>
        <form name="form1" method="post" action="/ShopOnline/listUsers">
          <div align="center">
            <input type="submit" name="cargasProd" id="cargasProd" value="Load Users">
            <input type="hidden" name="stats" value="stats">
          </div>
        </form>	
        <div align="center">
          <%}%>
          
        </div>
    <p align="center">&nbsp;</p>
    <p align="center">&nbsp;</p>
    <div align="center">
      <table width="15%" border="0" class="titulo">
        <tr>
          <th scope="col"><p align="center"><a href="statsBestsellers.jsp">Bestsellers</a></p>
            <p align="center"><a href="statsStock.jsp">Stock</a></p>
            <p align="center"><a href="statsDay.jsp">Sales</a></p>
          <p align="center"><a href="statsBestCustomers.jsp">Customers</a></p></th>
        </tr>
      </table>
    </div>
    <p align="center">&nbsp;</p>
    <h2 align="center"><a href="Admin.jsp"><img src="../images/b_prev.png" alt="back" width="40" height="40" align="absmiddle">Admin</a></h2>
        <p align="center">&nbsp; </p>
    </body>
</html>
